package com.neutech.maplestory.util;

import java.awt.*;
import java.security.Key;
import java.util.HashMap;
import java.util.Map;

/**加载项目中所有图片资源
 * @author 小李要吃鱼
 * @date 2021-01-27 17:47
 */
public class ImageUtil {
    public static Map<String, Image> imagesMape = new HashMap<>();

    static {
//            imagesMape.put("Logo",GameUtil.getImage("icon/logo"));
        for (int i = 0; i < 4; i++) {
            imagesMape.put("hero_right_stand" + i, GameUtil.getImage("hero/right/stand/stand1_" + i));
        }
        for (int i = 0; i < 4; i++) {
            imagesMape.put("hero_left_stand" + i, GameUtil.getImage("hero/left/stand/stand1_" + i));
        }

        for (int i = 0; i < 5; i++) {
            imagesMape.put("hero_right_walk" + i, GameUtil.getImage("hero/right/walk/walk1_" + i));
        }
        for (int i = 0; i < 5; i++) {
            imagesMape.put("hero_left_walk" + i, GameUtil.getImage("hero/left/walk/walk1_" + i));
        }
        imagesMape.put("hero_right_jump", GameUtil.getImage("hero/right/jump/jump1_0"));
        imagesMape.put("hero_left_jump", GameUtil.getImage("hero/left/jump/jump1_0"));
        imagesMape.put("hero_right_prone", GameUtil.getImage("hero/right/prone/prone_0"));
        imagesMape.put("hero_left_prone", GameUtil.getImage("hero/left/prone/prone_0"));
//        hero right shoot
        for (int i = 0; i < 4; i++) {
            imagesMape.put("hero_right_shoot" + i, GameUtil.getImage("hero/right/shoot/shoot1_" + i));
        }
//        hero left shoot
        for (int i = 0; i < 4; i++) {
            imagesMape.put("hero_left_shoot" + i, GameUtil.getImage("hero/left/shoot/shoot1_" + i));
        }
//        剑锋所指
        imagesMape.put("arrow_right",GameUtil.getImage("arrow/right/arrow"));
        imagesMape.put("arrow_left",GameUtil.getImage("arrow/left/arrow"));

    }
    private ImageUtil(){}
    public  static  Image getImages(String Key){
        return imagesMape.get(Key);
    }
}
